package com.sixth.controller;

import com.sixth.entity.Article;
import com.sixth.entity.Banner;
import com.sixth.entity.TableResult;
import com.sixth.service.ArticleService;
import com.sixth.until.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @program: self-tui-education
 * @description:
 * @author: C
 * @create: 2022-04-23 16:57
 **/
@RestController
@RequestMapping("/home/article")
public class ArticleController {
@Autowired
    private ArticleService articleService;
    //文章管理查询功能
    @PostMapping("/getArticleByNavId")
    private TableResult getArticleByNavId(@RequestBody Article article ) {

        return articleService.getArticleByNavId(article.getNavId());

    }
    @PostMapping("/updateArticleByNavId")
    private CommonResult updateArticleByNavId(@RequestBody Article article){
        return articleService.updateArticleByNavId(article);
    }

}
